package home1ess.passport.pojo.param;

import lombok.Data;
import lombok.experimental.FieldDefaults;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@FieldDefaults(level = lombok.AccessLevel.PRIVATE)
public class UserLoginParam implements Serializable {

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^(13[0-9]|14[5-9]|15[0-3,5-9]|16[6]|17[0-8]|18[0-9]|19[8,9])\\d{8}$", message = "手机号格式错误")
    String phoneNumber;

    @NotBlank(message = "密码不能为空")
    String password;
}
